<template>
    <div class="swiper">
        <swiper :options="swiperOption">
            <!-- slides -->
            <swiper-slide v-for="item of list" :key="item.id">
                <img class="picShow" :src="item.imgUrl" />
            </swiper-slide>
            <!-- Optional controls -->
            <div class="swiper-pagination"  slot="pagination"></div>
        </swiper>
    </div>
</template>

<script>
export default {
  name: 'Wheel',
  props: {
    list: Array
  },
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        autoplay: 4000
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
.swiper >>>.swiper-pagination-bullet-active
    background:#fff
.swiper
   width:100%
   height:0
   overflow:hidden
   padding-bottom:31%
   background:#eee
.picShow
   width:100%
</style>
